import { TMapInstance } from './Map';
import { Point } from './Point';

export enum ControlPosition {
    'T_ANCHOR_TOP_LEFT'= 'T_ANCHOR_TOP_LEFT',
    'T_ANCHOR_TOP_RIGHT'= 'T_ANCHOR_TOP_RIGHT',
    'T_ANCHOR_BOTTOM_LEFT'= 'T_ANCHOR_BOTTOM_LEFT',
    'T_ANCHOR_BOTTOM_RIGHT'= 'T_ANCHOR_BOTTOM_RIGHT'
  }

export interface ControlOptions {
    position?: ControlPosition;
}


export interface ControlConstructor {
    new(opts?: ControlOptions): Control;
    Zoom: ControlZoomConstructor;
  }


export interface Control {
    setPosition(position: ControlPosition): void;
    getPosition(): ControlPosition;
    onAdd(map: TMapInstance): void;
    onRemove(): void;
    getContainer(): HTMLElement;
    show(): void;
    hide(): void;
    isVisible (): boolean;
    setOffset(offset: Point): void;
    getOffset(): Point;
    setOptions(opt: JSON): JSON;
}


export interface ZoomOptions extends ControlOptions {
    zoomInText?: string;
    zoomOutText?: string;
    zoomInTitle?: string;
    zoomOutTitle?: string;
}


export interface ControlZoomConstructor {
    new(opts?: ZoomOptions): ControlZoom;
  }


export interface ControlZoom extends Control {
    show(): void;
    hide(): void;
}

